package com.cloudptt.api.product.config.call;

import android.content.SharedPreferences;

public class LocalConfig {
    public static final String Key_SaInfo = "sa_info";
    public static final String Defaule_SaInfo = "123456789012";

    private SharedPreferences sp = null;
    private String saInfo = "";

    public LocalConfig(SharedPreferences sp)
    {
        this.sp = sp;
        this.saInfo = sp.getString(Key_SaInfo,Defaule_SaInfo);
    }
    public String getSaInfo() {
        return saInfo;
    }

    public void setSaInfo(String saInfo) {
        this.saInfo = saInfo;
        SharedPreferences.Editor editor = sp.edit();
        editor.putString(Key_SaInfo, saInfo);

        editor.commit();
    }

    public String toString()
    {
        StringBuffer strBuf = new StringBuffer("" + this.getClass() + ":");
        strBuf.append("saInfo = ").append(saInfo).append("  ");
//        strBuf.append("answerModeVideo = ").append(answerModeVideo).append("  ");

        return strBuf.toString();
    }
}
